<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>管理员登录-Bug统计考量脚本 1.0</title>
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
    <link type="text/css"  rel="stylesheet" href="../static/css/font.css">
	<link type="text/css" rel="stylesheet" href="../static/css/weadmin.css">
    <script type="text/javascript" src="../lib/layui/layui.js" charset="utf-8"></script>

</head>
<body class="login-bg">
    
    <div class="login">
        <div class="message">Bug统计考量脚本</div>
        <div id="darkbannerwrap"></div>
        <!--action="/login"-->
        <form method="post" class="layui-form" >
            <input name="username" placeholder="用户名"  type="text" lay-verify="username" class="layui-input" >
            <hr class="hr15">
            <input name="password" lay-verify="password" placeholder="密码"  type="password" class="layui-input">
            <hr class="hr15">
            <input class="loginin" value="登录" lay-submit lay-filter="login" style="width:100%" type="submit">
            <hr class="hr20" >
            <div>
                报错内容：xxxx.xxxxx？
            </div>
        </form>
    </div>

<!-- 定义表单相关校验 -->
<script type="text/javascript">
    //<!--定义layer-->
    layui.extend({
				admin: '{/}./static/js/admin'
			});

    layui.use('form','admin', function () {
        var form = layui.form;
        var admin = layui.admin;

          //自定义验证规则
          form.verify({
            username: function(value){
              if(value.length < 6){
                return '用户名至少得6个字符啊';
              }
              if(value.length > 12){
                return '用户名不能超过12个字符啊';
              }
            }
            ,password: [
              /^[\S]{6,12}$/
              ,'密码必须6到12位，且不能出现空格'
            ]

          });

          //监听提交
              form.on('submit(login)', function(data){
                // alert(888)

                layer.msg(JSON.stringify(data.field),function(){
                    //返回成功
                    if(1==2){
                        location.href='index.html'
                    }
                });
                //

                return false;
              });

    });

</script>
</body>
</html>